<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=7.4.0">
  <link rel="mask-icon" href="/images/logo.svg?v=7.4.0" color="#222">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.7.0">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false,"dimmer":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: 'search.json',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="1. 服务器相关   变量名 备注 示例    nginx_version 当前运行的 Nginx 版本号 1.11.2   server_port 服务器端口 8080   server_addr 服务器端地址 127.0.0.1   server_name 服务器名称 127.0.0.1   server_protocol 服务器的HTTP版本 HTTP/1.0   status HTTP 响">
<meta name="keywords" content="nginx">
<meta property="og:type" content="article">
<meta property="og:title" content="nginx全局变量">
<meta property="og:url" content="https://unix2dos.github.io/p/80b24c5f.html">
<meta property="og:site_name" content="Levon&#39;s Blog">
<meta property="og:description" content="1. 服务器相关   变量名 备注 示例    nginx_version 当前运行的 Nginx 版本号 1.11.2   server_port 服务器端口 8080   server_addr 服务器端地址 127.0.0.1   server_name 服务器名称 127.0.0.1   server_protocol 服务器的HTTP版本 HTTP/1.0   status HTTP 响">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-09-27T15:36:51.180Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="nginx全局变量">
<meta name="twitter:description" content="1. 服务器相关   变量名 备注 示例    nginx_version 当前运行的 Nginx 版本号 1.11.2   server_port 服务器端口 8080   server_addr 服务器端地址 127.0.0.1   server_name 服务器名称 127.0.0.1   server_protocol 服务器的HTTP版本 HTTP/1.0   status HTTP 响">
  <link rel="canonical" href="https://unix2dos.github.io/p/80b24c5f">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>nginx全局变量 | Levon's Blog</title>
  








  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Levon's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
        <h1 class="site-subtitle" itemprop="description">微信:  L6241425</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>时光</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-categories">
      
    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-tags">
      
    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger">
        
          <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
      </li>
    
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocorrect="off" autocapitalize="none"
           placeholder="搜索..." spellcheck="false"
           type="text" id="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result"></div>

</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
            

          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="https://unix2dos.github.io/p/80b24c5f.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Levon">
      <meta itemprop="description" content="Never Give Up">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Levon's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">nginx全局变量

          
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2019-07-06 11:44:46" itemprop="dateCreated datePublished" datetime="2019-07-06T11:44:46+08:00">2019-07-06</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-09-27 23:36:51" itemprop="dateModified" datetime="2019-09-27T23:36:51+08:00">2019-09-27</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/2-linux系统/" itemprop="url" rel="index"><span itemprop="name">2-linux系统</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/2-linux系统/nginx/" itemprop="url" rel="index"><span itemprop="name">nginx</span></a></span>

                
                
              
            </span>
          

          
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
        
      
      <span class="post-meta-item-text">Disqus：</span>
    
    <a title="disqus" href="/p/80b24c5f.html#comments" itemprop="discussionUrl"><span class="post-comments-count disqus-comment-count" data-disqus-identifier="p/80b24c5f.html" itemprop="commentCount"></span></a>
  </span>
  
  
          <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="fa fa-file-word-o"></i>
              </span>
              
                <span class="post-meta-item-text">本文字数：</span>
              
              <span>3.1k</span>
            </span>
          
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="fa fa-clock-o"></i>
              </span>
              
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              
              <span>3 分钟</span>
            </span>
          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="1-服务器相关"><a href="#1-服务器相关" class="headerlink" title="1. 服务器相关"></a>1. 服务器相关</h3><table>
<thead>
<tr>
<th>变量名</th>
<th>备注</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td><code>nginx_version</code></td>
<td>当前运行的 Nginx 版本号</td>
<td>1.11.2</td>
</tr>
<tr>
<td><code>server_port</code></td>
<td>服务器端口</td>
<td>8080</td>
</tr>
<tr>
<td><code>server_addr</code></td>
<td>服务器端地址</td>
<td>127.0.0.1</td>
</tr>
<tr>
<td><code>server_name</code></td>
<td>服务器名称</td>
<td>127.0.0.1</td>
</tr>
<tr>
<td><code>server_protocol</code></td>
<td>服务器的HTTP版本</td>
<td>HTTP/1.0</td>
</tr>
<tr>
<td><code>status</code></td>
<td>HTTP 响应代码</td>
<td>200</td>
</tr>
<tr>
<td><code>time_iso8601</code></td>
<td>服务器时间的 ISO 8610 格式</td>
<td>2018-09-02T15:14:27+08:00</td>
</tr>
<tr>
<td><code>time_local</code></td>
<td>服务器时间（LOG Format 格式）</td>
<td>02/Sep/2018:15:14:27 +0800</td>
</tr>
<tr>
<td><code>document_root</code></td>
<td>当前请求的文档根目录或别名</td>
<td><code>/home/xiaowu/github/echo.xuexb.com</code></td>
</tr>
<tr>
<td><code>request_filename</code></td>
<td>当前连接请求的文件路径，由 <code>root</code>或 <code>alias</code>指令与 URI 请求生成</td>
<td><code>/home/xiaowu/github/echo.xuexb.com/api/dump/path</code></td>
</tr>
<tr>
<td><code>request_completion</code></td>
<td>如果请求成功，值为”OK”，如果请求未完成或者请求不是一个范围请求的最后一部分，则为空</td>
<td></td>
</tr>
<tr>
<td><code>pid</code></td>
<td>工作进程的PID</td>
<td>1234</td>
</tr>
<tr>
<td><code>msec</code></td>
<td>当前的Unix时间戳</td>
<td>1535872750.954</td>
</tr>
<tr>
<td><code>limit_rate</code></td>
<td>用于设置响应的速度限制</td>
<td>0</td>
</tr>
<tr>
<td><code>pipe</code></td>
<td>如果请求来自管道通信，值为“p”，否则为“.”</td>
<td>.</td>
</tr>
<tr>
<td><code>connection_requests</code></td>
<td>TCP连接当前的请求数量</td>
<td>1</td>
</tr>
<tr>
<td><code>connection</code></td>
<td>TCP 连接的序列号</td>
<td>363861</td>
</tr>
<tr>
<td><code>realpath_root</code></td>
<td>当前请求的文档根目录或别名的真实路径，会将所有符号连接转换为真实路径</td>
<td>/home/xiaowu/github/echo.xuexb.com</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
<a id="more"></a>

<h3 id="2-客户端相关"><a href="#2-客户端相关" class="headerlink" title="2. 客户端相关"></a>2. 客户端相关</h3><table>
<thead>
<tr>
<th>变量名</th>
<th>示例</th>
<th>备注</th>
</tr>
</thead>
<tbody><tr>
<td>host</td>
<td>echo.xuexb.com</td>
<td>优先级如下：HTTP请求行的主机名&gt;”HOST”请求头字段&gt;符合请求的服务器名</td>
</tr>
<tr>
<td>hostname</td>
<td>bj01</td>
<td>主机名</td>
</tr>
<tr>
<td>remote_port</td>
<td>58500</td>
<td>客户端端口</td>
</tr>
<tr>
<td>remote_user</td>
<td></td>
<td>用于HTTP基础认证服务的用户名</td>
</tr>
<tr>
<td>request</td>
<td>GET /api/dump/path?a=1&amp;%E4%B8%AD%E6%96%87=%E5%A5%BD%E7%9A%84%23123 HTTP/1.0</td>
<td>代表客户端的请求地址</td>
</tr>
<tr>
<td>remote_addr</td>
<td>127.0.0.1</td>
<td>客户端地址</td>
</tr>
<tr>
<td>request_body</td>
<td></td>
<td>客户端的请求主体, 此变量可在location中使用，将请求主体通过proxy_pass, fastcgi_pass, uwsgi_pass, 和 scgi_pass传递给下一级的代理服务器</td>
</tr>
<tr>
<td>request_body_file</td>
<td></td>
<td>将客户端请求主体保存在临时文件中文件处理结束后，此文件需删除如果需要之一开启此功能，需要设置client_body_in_file_only如果将次文件传递给后端的代理服务器，需要禁用request body，即设置proxy_pass_request_body off，fastcgi_pass_request_body off, uwsgi_pass_request_body off, or scgi_pass_request_body off</td>
</tr>
<tr>
<td>proxy_protocol_addr</td>
<td></td>
<td>获取代理访问服务器的客户端地址，如果是直接访问，该值为空字符串(1.5.12)</td>
</tr>
<tr>
<td>http_名称</td>
<td>http_accept_language -&gt; zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7</td>
<td>匹配任意请求头字段； 变量名中的后半部分“name”可以替换成任意请求头字段，如在配置文件中需要获取http请求头：“Accept-Language”，那么将“－”替换为下划线，大写字母替换为小写，形如：http_accept_language即可</td>
</tr>
<tr>
<td>bytes_sent</td>
<td>0</td>
<td>传输给客户端的字节数 (1.3.8, 1.2.5)</td>
</tr>
<tr>
<td>body_bytes_sent</td>
<td>0</td>
<td>传输给客户端的字节数，响应头不计算在内；这个变量和Apache的mod_log_config模块中的“%B”参数保持兼容</td>
</tr>
</tbody></table>
<h3 id="3-客户端相关-request-headers"><a href="#3-客户端相关-request-headers" class="headerlink" title="3. 客户端相关 - request headers"></a>3. 客户端相关 - request headers</h3><table>
<thead>
<tr>
<th>变量名</th>
<th>备注</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td><code>http_accept</code></td>
<td>浏览器支持的 MIME 类型</td>
<td><code>text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8</code></td>
</tr>
<tr>
<td><code>http_accept_encoding</code></td>
<td>浏览器支持的压缩编码</td>
<td><code>gzip, deflate, br</code></td>
</tr>
<tr>
<td><code>http_accept_language</code></td>
<td>浏览器支持的语言</td>
<td><code>zh-CN,zh;q=0.9,en;q=0.8</code></td>
</tr>
<tr>
<td><code>http_cache_control</code></td>
<td>浏览器缓存</td>
<td><code>max-age=0</code></td>
</tr>
<tr>
<td><code>http_connection</code></td>
<td>客户端与服务连接类型</td>
<td></td>
</tr>
<tr>
<td><code>http_cookie</code></td>
<td>浏览器请求 cookie</td>
<td><code>a=1; b=2</code></td>
</tr>
<tr>
<td><code>http_host</code></td>
<td>浏览器请求 host</td>
<td>echo.xuexb.com</td>
</tr>
<tr>
<td><code>http_referer</code></td>
<td>浏览器来源</td>
<td><a href="https://echo.xuexb.com/" target="_blank" rel="noopener">https://echo.xuexb.com/</a></td>
</tr>
<tr>
<td><code>http_upgrade_insecure_requests</code></td>
<td>是一个请求首部，用来向服务器端发送信号，表示客户端优先选择加密及带有身份验证的响应，并且它可以成功处理 upgrade-insecure-requests CSP 指令</td>
<td>1</td>
</tr>
<tr>
<td><code>http_user_agent</code></td>
<td>用户设备标识</td>
<td><code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36</code></td>
</tr>
<tr>
<td><code>http_x_requested_with</code></td>
<td>异步请求标识</td>
<td>true</td>
</tr>
<tr>
<td><code>http_x_forwarded_for</code></td>
<td>反向代理原 IP</td>
<td>198.13.61.105</td>
</tr>
</tbody></table>
<h3 id="4-链接相关"><a href="#4-链接相关" class="headerlink" title="4. 链接相关"></a>4. 链接相关</h3><table>
<thead>
<tr>
<th>变量名</th>
<th>备注</th>
<th>示例</th>
</tr>
</thead>
<tbody><tr>
<td><code>scheme</code></td>
<td>请求使用的 WEB 协议</td>
<td>http</td>
</tr>
<tr>
<td><code>uri</code></td>
<td>请求中的当前 URI(不带请求参数)，可以不同于浏览器传递的 <code>$request_uri</code> 的值，它可以通过内部重定向，或者使用 <code>index</code> 指令进行修改</td>
<td><code>/api/dump/path</code></td>
</tr>
<tr>
<td><code>document_uri</code></td>
<td>同 <code>$uri</code></td>
<td><code>/api/dump/path</code></td>
</tr>
<tr>
<td><code>request_uri</code></td>
<td>这个变量等于包含一些客户端请求参数的原始 URI ，它无法修改</td>
<td><code>/api/dump/path?a=1&amp;%E4%B8%AD%E6%96%87=%E5%A5%BD%E7%9A%84</code></td>
</tr>
<tr>
<td><code>request_method</code></td>
<td>HTTP 请求方法</td>
<td>GET</td>
</tr>
<tr>
<td><code>request_time</code></td>
<td>处理客户端请求使用的时间，从读取客户端的第一个字节开始计时</td>
<td>0.000</td>
</tr>
<tr>
<td><code>request_length</code></td>
<td>请求的长度（包括请求地址、请求头和请求主体）</td>
<td>678</td>
</tr>
<tr>
<td><code>args</code></td>
<td>请求参数</td>
<td><code>a=1&amp;%E4%B8%AD%E6%96%87=%E5%A5%BD%E7%9A%84</code></td>
</tr>
<tr>
<td><code>query_string</code></td>
<td>同 <code>$args</code></td>
<td></td>
</tr>
<tr>
<td><code>is_args</code></td>
<td>请求中是否有参数，有则为 <code>?</code> 否则为空</td>
<td><code>?</code></td>
</tr>
<tr>
<td><code>arg_参数名</code></td>
<td>请求中具体的参数</td>
<td><code>$arg_a</code> =&gt; <code>1</code></td>
</tr>
<tr>
<td><code>https</code></td>
<td>如果开启了 SSL 安全模式，则为 <code>on</code> 否则为空</td>
<td><code>on</code></td>
</tr>
</tbody></table>
<h3 id="5-参考资料"><a href="#5-参考资料" class="headerlink" title="5. 参考资料"></a>5. 参考资料</h3><ul>
<li><a href="https://xuexb.github.io/learn-nginx/variable/" target="_blank" rel="noopener">https://xuexb.github.io/learn-nginx/variable/</a></li>
<li><a href="https://nginx.org/en/docs/" target="_blank" rel="noopener">https://nginx.org/en/docs/</a></li>
</ul>

    </div>

    
    
    
        
      
        <div id="reward-container">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作, 一个耿直的笑脸~</div>
  <button id="reward-button" disable="enable" onclick="var qr = document.getElementById(&quot;qr&quot;); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
        
      
      <div style="display: inline-block">
        <img src="/images/wechatpay.jpg" alt="Levon 微信支付">
        <p>微信支付</p>
      </div>
        
      
      <div style="display: inline-block">
        <img src="/images/alipay.jpg" alt="Levon 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>

      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/nginx/" rel="tag"># nginx</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
                <a href="/p/d039.html" rel="next" title="nginx泛域名解析">
                  <i class="fa fa-chevron-left"></i> nginx泛域名解析
                </a>
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/p/4c38afcc.html" rel="prev" title="nginx通过upstream实现负载均衡">
                  nginx通过upstream实现负载均衡 <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          
    
    
  <div class="comments" id="comments">
    <div id="disqus_thread">
      <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
    </div>
  </div>
  
  

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-服务器相关"><span class="nav-number">1.</span> <span class="nav-text">1. 服务器相关</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-客户端相关"><span class="nav-number">2.</span> <span class="nav-text">2. 客户端相关</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-客户端相关-request-headers"><span class="nav-number">3.</span> <span class="nav-text">3. 客户端相关 - request headers</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-链接相关"><span class="nav-number">4.</span> <span class="nav-text">4. 链接相关</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-参考资料"><span class="nav-number">5.</span> <span class="nav-text">5. 参考资料</span></a></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
      src="/images/avatar.jpg"
      alt="Levon">
  <p class="site-author-name" itemprop="name">Levon</p>
  <div class="site-description" itemprop="description">Never Give Up</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">127</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        <span class="site-state-item-count">34</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        <span class="site-state-item-count">76</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://github.com/unix2dos" title="GitHub &rarr; https://github.com/unix2dos" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="mailto:levonfly@gmail.com" title="E-Mail &rarr; mailto:levonfly@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://twitter.com/levonfly" title="Twitter &rarr; https://twitter.com/levonfly" rel="noopener" target="_blank"><i class="fa fa-fw fa-twitter"></i>Twitter</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://weibo.com/l6241425" title="Weibo &rarr; https://weibo.com/l6241425" rel="noopener" target="_blank"><i class="fa fa-fw fa-weibo"></i>Weibo</a>
      </span>
    
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Levon</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    <span title="站点总字数">507k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">7:41</span>
</div>

        












        
      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js?v=3.1.0"></script>
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/pisces.js?v=7.4.0"></script>

<script src="/js/next-boot.js?v=7.4.0"></script>



  
  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>








  <script src="/js/local-search.js?v=7.4.0"></script>














  

  

  

<script>
  function loadCount() {
    var d = document, s = d.createElement('script');
    s.src = 'https://levonfly.disqus.com/count.js';
    s.id = 'dsq-count-scr';
    (d.head || d.body).appendChild(s);
  }
  // defer loading until the whole page loading is completed
  window.addEventListener('load', loadCount, false);
</script>
<script>
  function disqus_config() {
    this.page.url = "https://unix2dos.github.io/p/80b24c5f.html";
    this.page.identifier = "p/80b24c5f.html";
    this.page.title = 'nginx全局变量';};
  function loadComments() {
    if (window.DISQUS) {
      DISQUS.reset({
        reload: true,
        config: disqus_config
      });
    } else {
      var d = document, s = d.createElement('script');
      s.src = 'https://levonfly.disqus.com/embed.js';
      s.setAttribute('data-timestamp', '' + +new Date());
      (d.head || d.body).appendChild(s);
    }
  }
    window.addEventListener('load', loadComments, false);
  
</script>

</body>
</html>
